package com.feiyu.sys.utils

import com.alibaba.fastjson.JSONArray
import com.feiyu.sys.web.ResponseVo
import org.apache.commons.collections.ListUtils
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner

/**
 * Created by zdy on 2017/11/28.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
class DynamicSqlExecuteUtilsTest extends GroovyTestCase {

    @Autowired
    DynamicSqlExecuteUtils executeUtils

    @Test
    void testGetMultiColumns() {
        ResponseVo result = executeUtils.getMultiColumns("select * from login_user")
        assertNotNull(result.data)
    }

    @Test
    void testGetOneColumn() {
        ResponseVo result = executeUtils.getOneColumn("select * from login_user")
        assertNotNull(result.data)
    }
}
